#include <stdio.h>

int main()
{
    int n;
    double m;
    scanf("%d",&n);
    if(n<=150)
        m=0.4463*n;
    else if(n>=151 && n<=400)
        m=(n-150)*0.4663+150*0.4463;
    else
        m=150*0.4463+(400-150)*0.4663+(n-400)*0.5663;
    printf("%.1lf",m);
}